{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "e47fa89f-c43f-41ca-86c1-8d8e34309634",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "140716485177224\n",
      "140716485177224\n"
     ]
    }
   ],
   "source": [
    "# id() 返回对象的整数标识\n",
    "num = 100\n",
    "print(id(num))\n",
    "print(id(100))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "03ce9ab1-0bc1-4aed-962f-b4b60717926f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "140716485177224\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# is 判断是否为同一个对象 地址\n",
    "num2 = num\n",
    "print(id(num2))\n",
    "num is num2"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
